﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Sealight.Core.DataAdapter;
using Sealight.CoreAPI;
using Sealight.API.Ioc;
namespace Sealight.UI.WebUI.Services
{
    public class ServicesService
    {
        public static IList<service> Gets()
        {
            var svc = IocContainer.Container().Resolve<IDVService>();

            return svc.GetAll();
        }

        public static service GetById(Guid id)
        {
            var svc = IocContainer.Container().Resolve<IDVService>();
            return svc.GetById(id);
        }
        public static service AddUpdate(service data)
        {
            var svc = IocContainer.Container().Resolve<IDVService>();
            return svc.AddOrUpdate(data);
        }
        public static void Delete(Guid id)
        {
            var svc = IocContainer.Container().Resolve<IDVService>();
            svc.Delete(new service { id = id });
        }
    }
}